Release 10.1A: OpenEdge Data Management:
SQL Reference
WHENEVER
Specifies actions for three SQL run-time exceptions.
Syntax
{ NOT FOUND | SQLERROR | SQLWARNING }{ STOP | CONTINUE | GOTO | GO TO } host_lang_label }Examples
- The
STOPexception results in the ESQL program stopping execution.- The
CONTINUEexception results in the ESQL program continuing execution. The default exception is toCONTINUE.GOTO|GOhost_lang_label results in the ESQL program execution to branch to the statement corresponding to the host_lang_label.
Notes
- You can place multiple
WHENEVERstatements for the same exception in a source file. EachWHENEVERstatement overrides the previousWHENEVERstatement specified for the same exception.- Correct operation of a WHENEVER statement with a
GOTOhost_language_labelor aGO TOhost_language_labelis subject to the scoping rules of the C language. Thehost_language_labelmust be within the scope of all SQL statements for which the action is active. TheGO TOorGOTOaction is active starting from the correspondingWHENEVERstatement until anotherWHENEVERstatement for the same exception, or until end of the file.Authorization
None
Related statements
FETCH
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |